def fibonacci(n):
    a, b = 1, 1
    for _ in range(3, n+1):
        a, b = b, a + b

    return b
num = int(input("请输入要计算的斐波那契数列项数："))
result = fibonacci(num)
print("第", num, "项的斐波那契数列值为：", result)
